<template lang="pug">
  div
    structure-head
    .notice__mod.container
      h1 通知
      .notice__list
        .notice__item(v-for="item in list")
          h5 {{item.title}}
            small {{item.createdTime}} 系统通知
          .notice__item__bd
            p {{item.content}}
            a.notice__item__expand(href="") 收起

      .page__mod.notice__page
        a.btn.btn-light(href="") 上一页
        a.btn.btn-light(href="") 1
        a.btn.btn-light(href="") 2
        span.btn ......
        a.btn.btn-light(href="") 10
        a.btn.btn-light(href="") 11
        a.btn.btn-light(href="") 下一页
</template>
<style lang="scss">
.notice__page {
  text-align: center;
  margin-top: 30px;
}
.notice__mod {
  h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-left: 20px;
  }
}
.notice__item {
  padding: 15px 20px;
  margin-bottom: 15px;
  background: #fafafa;
  border-radius: 10px;
  h5 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    line-height: 25px;
    @include clearfix;
    small {
      float: right;
      font-size: 12px;
      color: #c6c6c6;
    }
  }
 
}
.notice__item__bd {
  padding-top: 14px;
  border-top: 1px solid #ececec;
  p {
    font-size: 14px;
  }
}
.notice__item__expand {
  display: block;
  width: 2em;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
</style>

<script>
import head from '../components/headStudent.vue'
import api from 'api/notice'
export default {
  components: {
    structureHead: head
  },
  data () {
    return {
      list: []
    }
  },
  created () {
    this.getNotices()
  },
  methods: {
    getNotices () {
      api.getNotices({
        studentid: '120176400199057409',
        from: 0,
        size: 9
      }).then((response) => {
        this.list = response.data.data
      })
    }
  }
}
</script>

